package com.jinlingxiu.app.other.adapter

import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import cn.bingoogolapple.baseadapter.BGARecyclerViewAdapter
import cn.bingoogolapple.baseadapter.BGAViewHolderHelper
import com.jinlingxiu.app.R
import com.jinlingxiu.app.other.bean.SolutionBean
import com.xdja.easymvp.utils.setVerticalDivider

/**
 * @author yuanwanli
 * @des
 * @date 2020/9/18
 */
class SolutionAdapter(recyclerView: RecyclerView) :
    BGARecyclerViewAdapter<SolutionBean>(recyclerView, R.layout.item_solution) {
    init {
        recyclerView.layoutManager = LinearLayoutManager(mContext)
        recyclerView.setVerticalDivider(mContext, 10, R.color.color_FAFAFA)
        recyclerView.adapter = this
    }

    override fun fillData(helper: BGAViewHolderHelper, position: Int, model: SolutionBean) {
        helper.setText(R.id.tvTitle, model.getTitle())
        helper.setText(R.id.tvContent, model.getTongue())
    }
}